ARG DOCKER_REGISTER='172.23.12.107:5000'
FROM ${DOCKER_REGISTER}/wn-nodejs14:1.0
WORKDIR /www/workspace/
COPY  . .
COPY deploy/nginx/web.conf /etc/nginx/sites-enabled/default
RUN export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" && \
                   [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \
&& echo $NVM_DIR && nvm install 14 && nvm use 14 && node -v && npm install && npm run  build
ARG ENV="test"
ENTRYPOINT  ["bash","./deploy/start.sh"]
